package com.zxjbyte.yiyi.extension.job.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author zhangxingjia
 * @Date 2023/10/10 15:43
 * @Version: 1.0
 */
@Data
@Accessors(chain = false)
@TableName("ext_job_log")
public class JobLogPO implements Serializable {

    private static final long serialVersionUID = -3332532172161911306L;

    // 自增主键
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    // 任务key
    @TableField("job_key")
    private String jobKey;

    // 触发器key
    @TableField("trigger_key")
    private String triggerKey;

    // 实际触发时间
    @TableField("fire_time")
    private Date fireTime;

    // 任务执行开始时间
    @TableField("start_time")
    private Date startTime;

    // 任务执行结束时间
    @TableField("end_time")
    private Date endTime;

    // 执行耗时（毫秒）
    @TableField("execution_time")
    private Integer executionTime;

    // 重新触发次数
    @TableField("refire_count")
    private Integer refireCount;

    // 任务状态 1:成功, 2:失败
    @TableField("status")
    private Integer status;

    @TableLogic
    private Boolean deleted;
}
